package com.mingqijia.gassafety.shared.user;

import com.mingqijia.gassafety.shared.constant.Constants;

/**
 * 社交账号用户信息
 * @author Damon S.
 * @version v0.2
 * @date 2021-09-14 19:42
 */
public interface UserSocial extends UserAware {
    /**
     * 获取OpenId
     * @return 返回字符串
     */
    String getOpenId();

    /**
     * 获取UnionId
     * @return 返回字符串
     */
    String getUnionId();

    /** 默认用户 */
    UserSocial DEFAULT_USER = new UserSocial() {
        @Override
        public String getUserId() {
            return Constants.STR_MINUS_ONE;
        }
        @Override
        public String getOpenId() {
            return null;
        }
        @Override
        public String getUnionId() {
            return null;
        }
    };
}
